[DeviceSanitizer] Implement symbolizer for more readable information#1844
[DeviceSanitizer] Implement symbolizer for more readable information#1844omarahmed1111 merged 3 commits intooneapi-src:mainfrom
Conversation
yingcong-wu
left a comment
There was a problem hiding this comment.
Could you provide a comparison of the output text so that we can see the result difference?
|
Take the case https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/AddressSanitizer/use-after-free/use-after-free.cpp as a example. Before this change, the output just like: After this change, the output just like: |
| if (SymbolizeCode(ModuleName, (uint64_t)Frames[i], Result)) { | ||
| SourceInfo SrcInfo = ParseSymbolizerOutput(Result); | ||
| std::ostringstream OS; | ||
| if (SrcInfo.file != "??") { | ||
| OS << "in " << SrcInfo.function << " " << SrcInfo.file | ||
| << ":" << SrcInfo.line << ":" << SrcInfo.column; | ||
| } else { | ||
| OS << "in " << SrcInfo.function << " (" << ModuleName << "+" | ||
| << Frames[i] << ")"; | ||
| } | ||
| Stack.stack.emplace_back(OS.str()); | ||
| continue; | ||
| } |
There was a problem hiding this comment.
I know I was a bit hasty in implementing this part at first, in fact, the symbolization should be invoked as late as possible.
Can you save as few as possible information when doing backtrace, and symbolize them when really need it?
Thank you!
There was a problem hiding this comment.
I think we can get handle of the module, not file path
There was a problem hiding this comment.
I know I was a bit hasty in implementing this part at first, in fact, the symbolization should be invoked as late as possible. Can you save as few as possible information when doing backtrace, and symbolize them when really need it? Thank you!
I agree, the symbolization takes time, so we should only do it when necessary (in error reporting stage I think).
There was a problem hiding this comment.
nice suggestions. updated.
|
The new error reporting message looks good and more useful, nice improvement! |
|
Please provide the link to the PR of intel/llvm. |
e22c966 to
90fc969
Compare
90fc969 to
895cd11
Compare
895cd11 to
dac2a0f
Compare
SYCLOS Part: intel/llvm#14513